/*
 * Selling Partner API for Replenishment
 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
 *
 * OpenAPI spec version: 2022-11-07
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package software.amazon.spapi.models.replenishment.v2022_11_07;

import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.util.Objects;

/** An object which contains offer metrics. */
@Schema(description = "An object which contains offer metrics.")
public class ListOfferMetricsResponseOffer {
    @SerializedName("asin")
    private String asin = null;

    @SerializedName("notDeliveredDueToOOS")
    private Double notDeliveredDueToOOS = null;

    @SerializedName("totalSubscriptionsRevenue")
    private Double totalSubscriptionsRevenue = null;

    @SerializedName("shippedSubscriptionUnits")
    private BigDecimal shippedSubscriptionUnits = null;

    @SerializedName("activeSubscriptions")
    private BigDecimal activeSubscriptions = null;

    @SerializedName("revenuePenetration")
    private Double revenuePenetration = null;

    @SerializedName("lostRevenueDueToOOS")
    private Double lostRevenueDueToOOS = null;

    @SerializedName("couponsRevenuePenetration")
    private Double couponsRevenuePenetration = null;

    @SerializedName("shareOfCouponSubscriptions")
    private Double shareOfCouponSubscriptions = null;

    @SerializedName("next30DayTotalSubscriptionsRevenue")
    private Double next30DayTotalSubscriptionsRevenue = null;

    @SerializedName("next60DayTotalSubscriptionsRevenue")
    private Double next60DayTotalSubscriptionsRevenue = null;

    @SerializedName("next90DayTotalSubscriptionsRevenue")
    private Double next90DayTotalSubscriptionsRevenue = null;

    @SerializedName("next30DayShippedSubscriptionUnits")
    private BigDecimal next30DayShippedSubscriptionUnits = null;

    @SerializedName("next60DayShippedSubscriptionUnits")
    private BigDecimal next60DayShippedSubscriptionUnits = null;

    @SerializedName("next90DayShippedSubscriptionUnits")
    private BigDecimal next90DayShippedSubscriptionUnits = null;

    @SerializedName("timeInterval")
    private TimeInterval timeInterval = null;

    @SerializedName("currencyCode")
    private String currencyCode = null;

    public ListOfferMetricsResponseOffer asin(String asin) {
        this.asin = asin;
        return this;
    }

    /**
     * The Amazon Standard Identification Number (ASIN).
     *
     * @return asin
     */
    @Schema(description = "The Amazon Standard Identification Number (ASIN).")
    public String getAsin() {
        return asin;
    }

    public void setAsin(String asin) {
        this.asin = asin;
    }

    public ListOfferMetricsResponseOffer notDeliveredDueToOOS(Double notDeliveredDueToOOS) {
        this.notDeliveredDueToOOS = notDeliveredDueToOOS;
        return this;
    }

    /**
     * The percentage of items that were not shipped out of the total shipped units over a period of time due to being
     * out of stock. Applicable to PERFORMANCE timePeriodType. minimum: 0 maximum: 100
     *
     * @return notDeliveredDueToOOS
     */
    @Schema(
            description =
                    "The percentage of items that were not shipped out of the total shipped units over a period of time due to being out of stock. Applicable to PERFORMANCE timePeriodType.")
    public Double getNotDeliveredDueToOOS() {
        return notDeliveredDueToOOS;
    }

    public void setNotDeliveredDueToOOS(Double notDeliveredDueToOOS) {
        this.notDeliveredDueToOOS = notDeliveredDueToOOS;
    }

    public ListOfferMetricsResponseOffer totalSubscriptionsRevenue(Double totalSubscriptionsRevenue) {
        this.totalSubscriptionsRevenue = totalSubscriptionsRevenue;
        return this;
    }

    /**
     * The revenue generated from subscriptions over a period of time. Applicable to PERFORMANCE timePeriodType.
     * minimum: 0
     *
     * @return totalSubscriptionsRevenue
     */
    @Schema(
            description =
                    "The revenue generated from subscriptions over a period of time. Applicable to PERFORMANCE timePeriodType.")
    public Double getTotalSubscriptionsRevenue() {
        return totalSubscriptionsRevenue;
    }

    public void setTotalSubscriptionsRevenue(Double totalSubscriptionsRevenue) {
        this.totalSubscriptionsRevenue = totalSubscriptionsRevenue;
    }

    public ListOfferMetricsResponseOffer shippedSubscriptionUnits(BigDecimal shippedSubscriptionUnits) {
        this.shippedSubscriptionUnits = shippedSubscriptionUnits;
        return this;
    }

    /**
     * The number of units shipped to the subscribers over a period of time. Applicable to PERFORMANCE timePeriodType.
     * minimum: 0
     *
     * @return shippedSubscriptionUnits
     */
    @Schema(
            description =
                    "The number of units shipped to the subscribers over a period of time. Applicable to PERFORMANCE timePeriodType.")
    public BigDecimal getShippedSubscriptionUnits() {
        return shippedSubscriptionUnits;
    }

    public void setShippedSubscriptionUnits(BigDecimal shippedSubscriptionUnits) {
        this.shippedSubscriptionUnits = shippedSubscriptionUnits;
    }

    public ListOfferMetricsResponseOffer activeSubscriptions(BigDecimal activeSubscriptions) {
        this.activeSubscriptions = activeSubscriptions;
        return this;
    }

    /**
     * The number of active subscriptions present at the end of the period. Applicable to PERFORMANCE timePeriodType.
     * minimum: 0
     *
     * @return activeSubscriptions
     */
    @Schema(
            description =
                    "The number of active subscriptions present at the end of the period. Applicable to PERFORMANCE timePeriodType.")
    public BigDecimal getActiveSubscriptions() {
        return activeSubscriptions;
    }

    public void setActiveSubscriptions(BigDecimal activeSubscriptions) {
        this.activeSubscriptions = activeSubscriptions;
    }

    public ListOfferMetricsResponseOffer revenuePenetration(Double revenuePenetration) {
        this.revenuePenetration = revenuePenetration;
        return this;
    }

    /**
     * The percentage of total program revenue out of total product revenue. Applicable to PERFORMANCE timePeriodType.
     * minimum: 0 maximum: 100
     *
     * @return revenuePenetration
     */
    @Schema(
            description =
                    "The percentage of total program revenue out of total product revenue. Applicable to PERFORMANCE timePeriodType.")
    public Double getRevenuePenetration() {
        return revenuePenetration;
    }

    public void setRevenuePenetration(Double revenuePenetration) {
        this.revenuePenetration = revenuePenetration;
    }

    public ListOfferMetricsResponseOffer lostRevenueDueToOOS(Double lostRevenueDueToOOS) {
        this.lostRevenueDueToOOS = lostRevenueDueToOOS;
        return this;
    }

    /**
     * The revenue that would have been generated had there not been out of stock. Applicable to PERFORMANCE
     * timePeriodType. minimum: 0
     *
     * @return lostRevenueDueToOOS
     */
    @Schema(
            description =
                    "The revenue that would have been generated had there not been out of stock. Applicable to PERFORMANCE timePeriodType.")
    public Double getLostRevenueDueToOOS() {
        return lostRevenueDueToOOS;
    }

    public void setLostRevenueDueToOOS(Double lostRevenueDueToOOS) {
        this.lostRevenueDueToOOS = lostRevenueDueToOOS;
    }

    public ListOfferMetricsResponseOffer couponsRevenuePenetration(Double couponsRevenuePenetration) {
        this.couponsRevenuePenetration = couponsRevenuePenetration;
        return this;
    }

    /**
     * The percentage of revenue from ASINs with coupons out of total revenue from all ASINs. Applicable to PERFORMANCE
     * timePeriodType. minimum: 0 maximum: 100
     *
     * @return couponsRevenuePenetration
     */
    @Schema(
            description =
                    "The percentage of revenue from ASINs with coupons out of total revenue from all ASINs. Applicable to PERFORMANCE timePeriodType.")
    public Double getCouponsRevenuePenetration() {
        return couponsRevenuePenetration;
    }

    public void setCouponsRevenuePenetration(Double couponsRevenuePenetration) {
        this.couponsRevenuePenetration = couponsRevenuePenetration;
    }

    public ListOfferMetricsResponseOffer shareOfCouponSubscriptions(Double shareOfCouponSubscriptions) {
        this.shareOfCouponSubscriptions = shareOfCouponSubscriptions;
        return this;
    }

    /**
     * The percentage of new subscriptions acquired through coupons. Applicable to PERFORMANCE timePeriodType. minimum:
     * 0 maximum: 100
     *
     * @return shareOfCouponSubscriptions
     */
    @Schema(
            description =
                    "The percentage of new subscriptions acquired through coupons. Applicable to PERFORMANCE timePeriodType.")
    public Double getShareOfCouponSubscriptions() {
        return shareOfCouponSubscriptions;
    }

    public void setShareOfCouponSubscriptions(Double shareOfCouponSubscriptions) {
        this.shareOfCouponSubscriptions = shareOfCouponSubscriptions;
    }

    public ListOfferMetricsResponseOffer next30DayTotalSubscriptionsRevenue(Double next30DayTotalSubscriptionsRevenue) {
        this.next30DayTotalSubscriptionsRevenue = next30DayTotalSubscriptionsRevenue;
        return this;
    }

    /**
     * The forecasted total subscription revenue for the next 30 days. Applicable to FORECAST timePeriodType. minimum: 0
     *
     * @return next30DayTotalSubscriptionsRevenue
     */
    @Schema(
            description =
                    "The forecasted total subscription revenue for the next 30 days. Applicable to FORECAST timePeriodType.")
    public Double getNext30DayTotalSubscriptionsRevenue() {
        return next30DayTotalSubscriptionsRevenue;
    }

    public void setNext30DayTotalSubscriptionsRevenue(Double next30DayTotalSubscriptionsRevenue) {
        this.next30DayTotalSubscriptionsRevenue = next30DayTotalSubscriptionsRevenue;
    }

    public ListOfferMetricsResponseOffer next60DayTotalSubscriptionsRevenue(Double next60DayTotalSubscriptionsRevenue) {
        this.next60DayTotalSubscriptionsRevenue = next60DayTotalSubscriptionsRevenue;
        return this;
    }

    /**
     * The forecasted total subscription revenue for the next 60 days. Applicable to FORECAST timePeriodType. minimum: 0
     *
     * @return next60DayTotalSubscriptionsRevenue
     */
    @Schema(
            description =
                    "The forecasted total subscription revenue for the next 60 days. Applicable to FORECAST timePeriodType.")
    public Double getNext60DayTotalSubscriptionsRevenue() {
        return next60DayTotalSubscriptionsRevenue;
    }

    public void setNext60DayTotalSubscriptionsRevenue(Double next60DayTotalSubscriptionsRevenue) {
        this.next60DayTotalSubscriptionsRevenue = next60DayTotalSubscriptionsRevenue;
    }

    public ListOfferMetricsResponseOffer next90DayTotalSubscriptionsRevenue(Double next90DayTotalSubscriptionsRevenue) {
        this.next90DayTotalSubscriptionsRevenue = next90DayTotalSubscriptionsRevenue;
        return this;
    }

    /**
     * The forecasted total subscription revenue for the next 90 days. Applicable to FORECAST timePeriodType. minimum: 0
     *
     * @return next90DayTotalSubscriptionsRevenue
     */
    @Schema(
            description =
                    "The forecasted total subscription revenue for the next 90 days. Applicable to FORECAST timePeriodType.")
    public Double getNext90DayTotalSubscriptionsRevenue() {
        return next90DayTotalSubscriptionsRevenue;
    }

    public void setNext90DayTotalSubscriptionsRevenue(Double next90DayTotalSubscriptionsRevenue) {
        this.next90DayTotalSubscriptionsRevenue = next90DayTotalSubscriptionsRevenue;
    }

    public ListOfferMetricsResponseOffer next30DayShippedSubscriptionUnits(
            BigDecimal next30DayShippedSubscriptionUnits) {
        this.next30DayShippedSubscriptionUnits = next30DayShippedSubscriptionUnits;
        return this;
    }

    /**
     * The forecasted shipped subscription units for the next 30 days. Applicable to FORECAST timePeriodType. minimum: 0
     *
     * @return next30DayShippedSubscriptionUnits
     */
    @Schema(
            description =
                    "The forecasted shipped subscription units for the next 30 days. Applicable to FORECAST timePeriodType.")
    public BigDecimal getNext30DayShippedSubscriptionUnits() {
        return next30DayShippedSubscriptionUnits;
    }

    public void setNext30DayShippedSubscriptionUnits(BigDecimal next30DayShippedSubscriptionUnits) {
        this.next30DayShippedSubscriptionUnits = next30DayShippedSubscriptionUnits;
    }

    public ListOfferMetricsResponseOffer next60DayShippedSubscriptionUnits(
            BigDecimal next60DayShippedSubscriptionUnits) {
        this.next60DayShippedSubscriptionUnits = next60DayShippedSubscriptionUnits;
        return this;
    }

    /**
     * The forecasted shipped subscription units for the next 60 days. Applicable to FORECAST timePeriodType. minimum: 0
     *
     * @return next60DayShippedSubscriptionUnits
     */
    @Schema(
            description =
                    "The forecasted shipped subscription units for the next 60 days. Applicable to FORECAST timePeriodType.")
    public BigDecimal getNext60DayShippedSubscriptionUnits() {
        return next60DayShippedSubscriptionUnits;
    }

    public void setNext60DayShippedSubscriptionUnits(BigDecimal next60DayShippedSubscriptionUnits) {
        this.next60DayShippedSubscriptionUnits = next60DayShippedSubscriptionUnits;
    }

    public ListOfferMetricsResponseOffer next90DayShippedSubscriptionUnits(
            BigDecimal next90DayShippedSubscriptionUnits) {
        this.next90DayShippedSubscriptionUnits = next90DayShippedSubscriptionUnits;
        return this;
    }

    /**
     * The forecasted shipped subscription units for the next 90 days. Applicable to FORECAST timePeriodType. minimum: 0
     *
     * @return next90DayShippedSubscriptionUnits
     */
    @Schema(
            description =
                    "The forecasted shipped subscription units for the next 90 days. Applicable to FORECAST timePeriodType.")
    public BigDecimal getNext90DayShippedSubscriptionUnits() {
        return next90DayShippedSubscriptionUnits;
    }

    public void setNext90DayShippedSubscriptionUnits(BigDecimal next90DayShippedSubscriptionUnits) {
        this.next90DayShippedSubscriptionUnits = next90DayShippedSubscriptionUnits;
    }

    public ListOfferMetricsResponseOffer timeInterval(TimeInterval timeInterval) {
        this.timeInterval = timeInterval;
        return this;
    }

    /**
     * Get timeInterval
     *
     * @return timeInterval
     */
    @Schema(description = "")
    public TimeInterval getTimeInterval() {
        return timeInterval;
    }

    public void setTimeInterval(TimeInterval timeInterval) {
        this.timeInterval = timeInterval;
    }

    public ListOfferMetricsResponseOffer currencyCode(String currencyCode) {
        this.currencyCode = currencyCode;
        return this;
    }

    /**
     * The currency code in ISO 4217 format.
     *
     * @return currencyCode
     */
    @Schema(description = "The currency code in ISO 4217 format.")
    public String getCurrencyCode() {
        return currencyCode;
    }

    public void setCurrencyCode(String currencyCode) {
        this.currencyCode = currencyCode;
    }

    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ListOfferMetricsResponseOffer listOfferMetricsResponseOffer = (ListOfferMetricsResponseOffer) o;
        return Objects.equals(this.asin, listOfferMetricsResponseOffer.asin)
                && Objects.equals(this.notDeliveredDueToOOS, listOfferMetricsResponseOffer.notDeliveredDueToOOS)
                && Objects.equals(
                        this.totalSubscriptionsRevenue, listOfferMetricsResponseOffer.totalSubscriptionsRevenue)
                && Objects.equals(this.shippedSubscriptionUnits, listOfferMetricsResponseOffer.shippedSubscriptionUnits)
                && Objects.equals(this.activeSubscriptions, listOfferMetricsResponseOffer.activeSubscriptions)
                && Objects.equals(this.revenuePenetration, listOfferMetricsResponseOffer.revenuePenetration)
                && Objects.equals(this.lostRevenueDueToOOS, listOfferMetricsResponseOffer.lostRevenueDueToOOS)
                && Objects.equals(
                        this.couponsRevenuePenetration, listOfferMetricsResponseOffer.couponsRevenuePenetration)
                && Objects.equals(
                        this.shareOfCouponSubscriptions, listOfferMetricsResponseOffer.shareOfCouponSubscriptions)
                && Objects.equals(
                        this.next30DayTotalSubscriptionsRevenue,
                        listOfferMetricsResponseOffer.next30DayTotalSubscriptionsRevenue)
                && Objects.equals(
                        this.next60DayTotalSubscriptionsRevenue,
                        listOfferMetricsResponseOffer.next60DayTotalSubscriptionsRevenue)
                && Objects.equals(
                        this.next90DayTotalSubscriptionsRevenue,
                        listOfferMetricsResponseOffer.next90DayTotalSubscriptionsRevenue)
                && Objects.equals(
                        this.next30DayShippedSubscriptionUnits,
                        listOfferMetricsResponseOffer.next30DayShippedSubscriptionUnits)
                && Objects.equals(
                        this.next60DayShippedSubscriptionUnits,
                        listOfferMetricsResponseOffer.next60DayShippedSubscriptionUnits)
                && Objects.equals(
                        this.next90DayShippedSubscriptionUnits,
                        listOfferMetricsResponseOffer.next90DayShippedSubscriptionUnits)
                && Objects.equals(this.timeInterval, listOfferMetricsResponseOffer.timeInterval)
                && Objects.equals(this.currencyCode, listOfferMetricsResponseOffer.currencyCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                asin,
                notDeliveredDueToOOS,
                totalSubscriptionsRevenue,
                shippedSubscriptionUnits,
                activeSubscriptions,
                revenuePenetration,
                lostRevenueDueToOOS,
                couponsRevenuePenetration,
                shareOfCouponSubscriptions,
                next30DayTotalSubscriptionsRevenue,
                next60DayTotalSubscriptionsRevenue,
                next90DayTotalSubscriptionsRevenue,
                next30DayShippedSubscriptionUnits,
                next60DayShippedSubscriptionUnits,
                next90DayShippedSubscriptionUnits,
                timeInterval,
                currencyCode);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class ListOfferMetricsResponseOffer {\n");

        sb.append("    asin: ").append(toIndentedString(asin)).append("\n");
        sb.append("    notDeliveredDueToOOS: ")
                .append(toIndentedString(notDeliveredDueToOOS))
                .append("\n");
        sb.append("    totalSubscriptionsRevenue: ")
                .append(toIndentedString(totalSubscriptionsRevenue))
                .append("\n");
        sb.append("    shippedSubscriptionUnits: ")
                .append(toIndentedString(shippedSubscriptionUnits))
                .append("\n");
        sb.append("    activeSubscriptions: ")
                .append(toIndentedString(activeSubscriptions))
                .append("\n");
        sb.append("    revenuePenetration: ")
                .append(toIndentedString(revenuePenetration))
                .append("\n");
        sb.append("    lostRevenueDueToOOS: ")
                .append(toIndentedString(lostRevenueDueToOOS))
                .append("\n");
        sb.append("    couponsRevenuePenetration: ")
                .append(toIndentedString(couponsRevenuePenetration))
                .append("\n");
        sb.append("    shareOfCouponSubscriptions: ")
                .append(toIndentedString(shareOfCouponSubscriptions))
                .append("\n");
        sb.append("    next30DayTotalSubscriptionsRevenue: ")
                .append(toIndentedString(next30DayTotalSubscriptionsRevenue))
                .append("\n");
        sb.append("    next60DayTotalSubscriptionsRevenue: ")
                .append(toIndentedString(next60DayTotalSubscriptionsRevenue))
                .append("\n");
        sb.append("    next90DayTotalSubscriptionsRevenue: ")
                .append(toIndentedString(next90DayTotalSubscriptionsRevenue))
                .append("\n");
        sb.append("    next30DayShippedSubscriptionUnits: ")
                .append(toIndentedString(next30DayShippedSubscriptionUnits))
                .append("\n");
        sb.append("    next60DayShippedSubscriptionUnits: ")
                .append(toIndentedString(next60DayShippedSubscriptionUnits))
                .append("\n");
        sb.append("    next90DayShippedSubscriptionUnits: ")
                .append(toIndentedString(next90DayShippedSubscriptionUnits))
                .append("\n");
        sb.append("    timeInterval: ").append(toIndentedString(timeInterval)).append("\n");
        sb.append("    currencyCode: ").append(toIndentedString(currencyCode)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /** Convert the given object to string with each line indented by 4 spaces (except the first line). */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}
